package com.example.javaairportflightanalysis.exception;

/**
 * @author shen
 * 异常枚举
 */
public enum MyExceptionEnum {
    REQUEST_PARAM_ERROR(10001, "参数错误"),
    NON_EXISTENT_USER(10002, "用户不存在"),
    PASSWORD_ERROR(10003, "账户或密码错误"),
    NEED_USER_NAME(10004, "需要用户名"),
    NEED_PASSWORD(10005, "需要密码"),
    PASSWORD_TO_SHORT(10006, "密码不能少于6位"),
    NAME_EXISTED(10007, "用户名已存在"),
    INSERT_FAILED(10008, "插入失败"),
    NO_DATA(10009, "没有数据"),
    NOT_PERMISSION(10010, "您没有访问权限，请联系管理员"),
    DFDL_CHECK_A_NOT_EXIST(10011, "该数据正在处于审核状态"),
    INSERT_ERROR(10012, "插入失败"),
    CHECK_STATUS_ERROR(10013, "该数据已经审核完毕"),
    LOGIN_ERROR(10014, "登录失败"),
    NO_ENUM(10015, "没有对应的枚举"),
    DATA_NOT_FOUND(10016, "数据不存在"),
    SYSTEM_ERROR(20000, "系统异常");


    //    异常码
    Integer code;
    //    异常信息
    String msg;

    MyExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    MyExceptionEnum() {
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
